<template>
  <el-header>
    <el-menu :default-active="'1'" mode="horizontal" class="el-menu-demo">
      <el-menu-item index="1">
        <router-link to="/">首页</router-link>
      </el-menu-item>
      <el-menu-item index="2">
        <router-link to="/products">产品列表</router-link>
      </el-menu-item>
      <el-menu-item index="3">
        <router-link to="/cart">购物车</router-link>
      </el-menu-item>
    </el-menu>
  </el-header>
</template>

<script>
export default {
  name: 'Navbar',
};
</script>

<style>
.el-header {
  background-color: #409EFF;
  color: white;
  padding: 10px;
}
.el-menu-demo {
  text-align: center;
}
</style>
